/*-----------------------------------------------------------------------
|                            FILE DESCRIPTION                           |
-----------------------------------------------------------------------*/
/*----------------------------------------------------------------------
  - File name     : Calibrate.h
  - Author        : liuzhihua
  - Update date   : 2022.5.11
  -	File Function : 
-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------
|                               UPDATE NOTE                             |
-----------------------------------------------------------------------*/
/**
 * Update note:
 * ------------   ---------------   ----------------------------------
 *     Date            Author                       Note
 * ------------   ---------------   ----------------------------------
 *   2022.5.11        liuzhihua                 Create file
 ***/

#ifndef __CALIBRATE_H_
#define __CALIBRATE_H_

#ifdef __cplusplus
extern "C"
{
#endif
/*-----------------------------------------------------------------------
|                               INCLUDES                                |
-----------------------------------------------------------------------*/

//#include "zh_iSwitch.h"
//#include "Keyboard.h"
//#include "zh_info_tool.h"
//#include "SteeringEngine.h"
//#include "LCD12864.h"
//#include "Joystick.h"
#include "motor.h"
#include "MotorControl.h"
#include "iMath.h"
#include "slr.h"
//#include "cap_ADS1118.h"

/*-----------------------------------------------------------------------
|                                DEFINES                                |
-----------------------------------------------------------------------*/
typedef struct CalibrateController
{
	uint8_t mode;
	uint8_t status;
	uint8_t SE_Enable:1;
	uint8_t PID_Enable:1;
	uint8_t Motor_Enable:1;
	uint8_t Param_Enable:1;
}CaliCtrl_t;

extern CaliCtrl_t CaliC;
/*-----------------------------------------------------------------------
|                             API FUNCTION                              |
-----------------------------------------------------------------------*/
void SE_Calibrate(void);
int MC_Prase(void);
int PID_Prase(void);
void Cali_Run(void);
int Param_Prase(void);
void Kalman_Cali_CMD(kalman1_t* pKL);
void Kalman_Param(char* str);
#ifdef __cplusplus
}
#endif

#endif
